OBJS = ast.cmo parser.cmo scanner.cmo semantics.cmo bytecode.cmo compile.cmo str.cma execute.cmo scam.cmo
TESTS = \


#TARFILES = Makefile testall.sh scanner.mll parser.mly \
#	ast.ml bytecode.ml interpret.ml compile.ml execute.ml microc.ml \
#	$(TESTS:%=tests/test-%.mc) \
#	$(TESTS:%=tests/test-%.out)

scam : $(OBJS)
	ocamlc -o scam $(OBJS)

.PHONY : test
test : scam testall.sh
	./testall.sh

scanner.ml : scanner.mll
	ocamllex scanner.mll

parser.ml parser.mli : parser.mly
	ocamlyacc parser.mly

%.cmo : %.ml
	ocamlc -c -w -8 $<

%.cmi : %.mli
	ocamlc -c $<


scam.tar.gz : $(TARFILES)
	cd .. && tar czf scam/scam.tar.gz $(TARFILES:%=scam/%)

.PHONY : clean
clean :
	rm -f scam parser.ml parser.mli scanner.ml testall.log \
	*.cmo *.cmi *.out *.output *.diff *~ tests/*.a.out tests/*.a.diff tests/*~

# Generated by ocamldep *.ml *.mli
ast.cmo:
ast.cmx:
bytecode.cmo: ast.cmo
bytecode.cmx: ast.cmx
compile.cmo: bytecode.cmo ast.cmo
compile.cmx: bytecode.cmx ast.cmx
parser.cmo: ast.cmo parser.cmi
parser.cmx: ast.cmx parser.cmi
scam.cmo: semantics.cmo scanner.cmo parser.cmi compile.cmo bytecode.cmo \
    ast.cmo
scam.cmx: semantics.cmx scanner.cmx parser.cmx compile.cmx bytecode.cmx \
    ast.cmx
scanner.cmo: parser.cmi
scanner.cmx: parser.cmx
semantics.cmo: ast.cmo
semantics.cmx: ast.cmx
parser.cmi: ast.cmo


